<?php
	//
	$userName = "devouty";
	$password = "quan2413";
	$databaseName = "testdb";
	$databaseTable = "linuxtest";
	
	
	$conn=MySQL_connect("localhost",$userName,$password) or die("connect error:".mysql_error());
	echo("Useing mysql,database".$databaseName.",user ".$userName.",table ".$databaseTable);
	MySQL_select_db($databaseName);
	$result = MySQL_query("select * from ".$databaseTable,$conn);
	
	echo "<table border=1><tr>";
	while($field = MySQL_fetch_field($result))
	{
		echo "<td>$nbsp".$field->name."&nbsp;</td>";
	}
	echo "</tr>";
	while($rows = MySQL_fetch_row($result))
	{
		echo "<tr>";
		for($i = 0;$i < count($rows); $i++)
			echo "<td>$nbsp".$rows[$i]."</td>";
	}
	echo "</tr></table>";
	
?>